﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SuperMarketSystem
{
    public partial class TimePick : Form//时间选择界面
    {
        DateTime date;
        String dateString;
        public TimePick(ref String dateString)//初始化时间字符串
        {
            InitializeComponent();
            this.dateString = dateString;
        }
        public DateTime returnTime()//返回时间值
        {
            return timeTrans.Value;
        }
        private void btnSubmit_Click(object sender, EventArgs e)//提交按钮触发 规格化字符串
        {
            DateTime dateTime = timeTrans.Value;
            date = dateTime;
            dateString = dateTime.ToString("yyyy-MM-dd HH:mm:ss");
            this.Close();
        }
    }
}
